#ifndef UTI_INDEXSERIES_H_
#define UTI_INDEXSERIES_H_
#pragma once
#include "sys_config.h"
#include "uti_memman.h"



typedef struct IndexData
{

	unsigned int changeflag; 					

	unsigned int index;

}IndexData;


typedef struct IndexSerInfo
{
	unsigned int sersize;
	void (*p)();


}IndexSerInfo;


class IndexSeries
{
public:
	IndexSeries(IndexSerInfo* pIndexserinfo);

	~IndexSeries();

	void Addindex(int index);


public:
	IndexData* m_pindexcur;//point to last bar of series, this bar may not complete(could be control by value of BarData.isend)

	unsigned int m_indexindex;// if m_pcur is avaliable, its value is >=0. ;
	// used to find other avaliable BarDate before m_pcur, for example used to caculate MA(5)


	IndexSerInfo m_indexserinfo;


	unsigned int* m_pindex_mq;
private:
	MemMan<IndexData>* m_pmemman; // memory management class of BarSeries. used to store Bar Series data. last bar is m_pobarcur. 



};



#endif